<?php


class User {

    private $id_user;
    private $login_user;
    private $pwd_user;
    private $email_user;


    public function __construct($valeur = array()){
        if(!empty($valeur)){
            $this->affecte($valeur);

        }
    }

    public function affecte($donnees){
        foreach ($donnees as  $attribut => $valeur){
            switch($attribut){
                case 'id_user': $this->setIdUser($valeur);
                    break;
                case 'login_user': $this->setLoginUser($valeur);
                    break;
                case 'pwd_user': $this->setPwdUser($valeur);
                    break;
                case 'email_user': $this->setEmailUser($valeur);
                    break;

           }
        }
    }
    /**
     * @param mixed $email_user
     */
    public function setEmailUser($email_user)
    {
        $this->email_user = $email_user;
    }

    /**
     * @return mixed
     */
    public function getEmailUser()
    {
        return $this->email_user;
    }

    /**
     * @param mixed $id_user
     */
    public function setIdUser($id_user)
    {
        $this->id_user = $id_user;
    }

    /**
     * @return mixed
     */
    public function getIdUser()
    {
        return $this->id_user;
    }

    /**
     * @param mixed $login_user
     */
    public function setLoginUser($login_user)
    {
        $this->login_user = $login_user;
    }

    /**
     * @return mixed
     */
    public function getLoginUser()
    {
        return $this->login_user;
    }

    /**
     * @param mixed $pwd_user
     */
    public function setPwdUser($pwd_user)
    {
        $this->pwd_user = $pwd_user;
    }

    /**
     * @return mixed
     */
    public function getPwdUser()
    {
        return $this->pwd_user;
    }



} 